package com.haier.constant;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import lombok.Data;

@Component
@Data
public class URLConstant {
	/**
	 * 钉钉网关gettoken地址
	 */
//	public static final String URL_GET_TOKKEN = "https://oapi.dingtalk.com/gettoken";
	public static final String URL_GET_TOKKEN = "https://openapi.haier.net/gateway/ihaier/gettoken";

	/**
	 * 获取用户在企业内userId的接口URL
	 */
//	public static final String URL_GET_USER_INFO = "https://oapi.dingtalk.com/user/getuserinfo";
	public static final String URL_GET_USER_INFO = "https://openapi.haier.net/gateway/ihaier/user/getuserinfo";

	/**
	 * 获取用户姓名的接口url
	 */
//	public static final String URL_USER_GET = "https://oapi.dingtalk.com/user/get";
	public static final String URL_USER_GET = "https://openapi.haier.net/gateway/ihaier/user/get";
	/** 创建群 */
//	public static final String URL_CREATE_CHAR = "https://oapi.dingtalk.com/chat/create";
	public static final String URL_CREATE_CHAR = "https://openapi.haier.net/gateway/ihaier/chat/create";
	/** 修改群 */
//	public static final String URL_UPDATE_CHAR = "https://oapi.dingtalk.com/chat/update";
	public static final String URL_UPDATE_CHAR = "https://openapi.haier.net/gateway/ihaier/chat/update";
	/** 发送群消息 */
//	public static final String URL_SEND_CHAR = "https://oapi.dingtalk.com/chat/send";
	public static final String URL_SEND_CHAR = "https://openapi.haier.net/gateway/ihaier/chat/send";
	/** 获取auth头 */
	public static final String URL_GET_AUTHORIZATION = "https://openapi.haier.net/auth/oauth/token?username=S00746&password=y%2BxebMTkbcWhyUwGhKohhQ%3D%3D&randomStr=39641558493227417&grant_type=password&scope=server&step=1";
	/** 获取dingid */
	public static final String URL_USER_GETDINGID = "https://openapi.haier.net/admin/user/getDingUserId/";
	/** 批量获取dingid */
	public static final String URL_USER_GETDINGIDS = "https://openapi.haier.net/admin/user/getDingUserId";
	/** 发送msg URL */
	public static final String URL_SEND_MSG = "https://openapi.haier.net/gateway/ihaier/topapi/message/corpconversation/asyncsend_v2";
	/** 获取ihaier二维码URL */
	public static final String IHAIER_QR = "https://hiface.haier.net/getQRContent";
	/** 获取ihaier头像 */
	public static final String IHAIER_FACE = "https://hiface.haier.net/getFace";
	/** 获取审核人工号 */
	public static final String IHAIER_APPROVER = "https://hiface.haier.net/other/getApproverId";
	/** 获取ihaier用户信息 */
	public static final String IHAIER_USERINFO = "https://hiface.haier.net/getEmployeeInfo";
	/** portal url */
	public static final String PORTAL_OAUTH = "https://idp.haier.net/idp/oauth2";
	/** portal 获取token */
	public static final String PORTAL_TOKEN = "/getToken";
	/** protal 获取用户信息 */
	public static final String PORTAL_USERINFO = "/getUserInfo";

	/** 发起待办url */
	@Value("${job.url}")
	private String jobUrl;

	@Value("${hipass.url}")
	private String hipassUrl;

	@Value("${portal.url}")
	private String portalUrl;
}
